import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;

public class Texte {
	
	public HashMap<String,Integer> argFctPredefinie = new HashMap<String,Integer>();
	
	public HashMap<String,Method> methodFctPredefinie = new HashMap<String,Method>();
	
	public Texte() {
		argFctPredefinie.put("majuscule", 1);
		argFctPredefinie.put("minuscule", 1);
				
		Class c = Texte.class;
		Method[] tab = c.getMethods();
		
		Method  m;
		for (int i=0;i<tab.length;i++) {
			m = tab[i];	
			if(m.getName().equals("majuscule"))
				methodFctPredefinie.put("majuscule", m);			
			if(m.getName().equals("minuscule"))
				methodFctPredefinie.put("minuscule", m);
		}
	}
	
	public static Object majuscule(ArrayList<Object> v,  HashMap<String, Object> penv) {
		return ((String) v.get(0)).toUpperCase();
	}

	public static Object minuscule(ArrayList<Object> v,  HashMap<String, Object> penv) {
		return ((String) v.get(0)).toLowerCase();
	}
}
